package com.lovo.enums;

import lombok.Data;
import lombok.Getter;

/**
 * @title
 * @author: luo
 * @date: 2020/11/17 16:59
 */
@Getter
public enum  UserCodeEnum {
    /**用户登录异常*/
    USER_LOGIN_ERROR(5100,"用户名或密码错误"),
    /**注册用户失败*/
    REGISTER_FAIL(5101,"注册用户失败"),
    /**删除用户失败*/
    FAIL_DELETE_USER(5102,"删除用户失败"),
    /**修改用户失败*/
    FAIL_UPDATE_USER(5103,"修改用户失败"),
    /**查无数据*/
    NO_DATA(5104,"查无数据"),
    /**参数格式错误*/
    PARAMETER_FORMAT_ERROR(5105,"参数格式错误"),
    /**发生未知异常*/
    UNKNOWN_FAIL(9999,"发生未知异常"),
    /**请求方式错误*/
    HTTP_REQUEST_METHOD_NOT_SUPPORTED(5106,"请求方式错误");
    /**状态码*/
    private Integer code;
    /**状态信息*/
    private String msg;


    UserCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


}
